{% extends extend_template %}
{%block center%}
{% include "transsys/addPromoterModal.html" %}

<div id="main" class="edit_form" >
    <h2 class="title">Add new gene</h2>
    <form name="editGene" action="add" id="editGene" method="post" class="edit">
    {% csrf_token %}
            <div class="input_field" >
                <label>Name:</label>
                <span class="helptext">Enter name of gene</span>
                <input type="text" name="name" />
            </div>
            <div class="input_field" >
                <label>Product:</label>
                <span class="helptext">Choose the factor encoding gene</span>
                <select name="product">
                    {% for f in request.session.ts_program.tp.factor_list %}
                        <option value="{{f.name}}">{{f.name}}</option>
                    {% endfor %}
                </select>
            </div>
            <div id="promoters" class="input_field">
                <label>Promoters:</label>
                <span class="helptext">Specifying the promoters which regulate this gene</span>
                <a href="#promoter_form" class="link-button" id="addPromoter">Add Promoter</a>
                <ul id="promoter_list">
                </ul>
            </div>
            {% comment %} Trick with_sgx parameter {% endcomment %}

            {% if extend_template == "simgenex/base_simgenex.html" %}
                <input type="hidden" name="with_sgx" value="1"/>
            {% endif %}
            <div>
                <button type="submit" name="submit" > Submit</button>
            </div>
    </form>
</div>
{% endblock %}